package cmo.neutech.day10.Level4Project8;

public class Utils {
    public int addition(int x){
        int sum = 0;
        for (int i = 0; i <= x; i++) {
            sum+=i;
        }
        return sum;
    }

    public int multip(int x){
        int sum = 1;
        for (int i = 1; i <= x; i++) {
            sum*=i;
        }
        return sum;
    }

    public int[] Y(int x[]){
        int t;
        for(int i=0;i<x.length;i++){
            for(int j=0;j<x.length;j++){
                if(x[j]>x[j+1]){
                    t = x[j];
                    x[j] = x[j+1];
                    x[j+1] =t;
                }
            }
        }
        return x;
    }

    public boolean X(int x){
        return x%2==0;
    }
}
